#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <iostream>
#include <vector>


#include <QMainWindow>
#include <QFileDialog>
#include <QString>

#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/video/video.hpp>
#include <opencv2/objdetect/objdetect.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/gpu/gpu.hpp>


using namespace std;
using namespace cv;
using namespace cv::gpu;

namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();

private:
    Ui::MainWindow *ui;
    QString mAviFileName;
    QString mCasFileName;
    bool mVidFileSelected;
    bool mCasFileSelected;
    bool mStopFlag;

    void detectFaceEyes_GPU(CascadeClassifier_GPU& csdFontalFace_gpu, GpuMat& input_image_gpu, Mat& input_image, bool bDraw);
    void detectFaceEyes_CPU(CascadeClassifier& csdFontalFace, Mat& input_gray_img, Mat& input_img, bool bDraw);
    void setProcBtnEnable();

private slots:
    void on_BtnVideoFileOpen_clicked();
    void on_BtnProc_clicked();
    void on_BtnStop_clicked();
    void on_BtnCascadeOpen_clicked();
};

#endif // MAINWINDOW_H
